<template>
	<view class="list-box">
		<view class="list-item box-border  f-row jc-sb ai-c" @tap="jumpPages(i.url,i.id)" v-for="i in list" :key="i.id">
			<view class="f-row ai-c">
				<image :src="i.iconUrl" mode="" class="icon"></image>
				<text>
					{{i.title}}
				</text>
			</view>
			<view class="" style="margin-left: 340rpx;">
				<u-tag v-if="i.id == 5 && count != 0" text="NEW" mode="dark" shape="circle" type="error" size="mini" style="height: 10px;"/>
			</view>
			<view class="jiantou">
				
			</view>
		</view>
		<u-modal :show="show" :closeOnClickOverlay="true" :showCancelButton='true' :title="'提示'" @confirm='confirm'
			@cancel='cancel' :content="'是否退出登录？'" confirmColor="#157DFA"></u-modal>
	</view>
</template>

<script>
	export default {
		props: {
				count: {
					type: Number
				}
		},
		data() {
			return {
				show: false,
				list: [{
					id: 1,
					title: '历史项目',
					iconUrl: '/static/icon/my/first.png',
					url: '/my_pages/Historical/Historical'
				}, {
					id: 2,
					title: '项目隐私协议',
					iconUrl: '/static/icon/my/second.png',
					url: `/pages/index/noticeList/details?type=pro`,
				},
				{
					id: 3,
					title: '用户引导',
					iconUrl: '/static/icon/my/third.png',
					url: '/my_pages/myTeach/myTeach'
				},
				{
					id: 4,
					title: '个人信息简介',
					iconUrl: '/static/icon/my/four.png',
					url: '/my_pages/myInfo/myInfo?type=introduce'
				}, 
				{
					id: 5,
					title: '推送消息',
					iconUrl: '/static/icon/my/five.png',
					url: '/my_pages/news/news'
				},
				{
					id: 6,
					title: '操作日志',
					iconUrl: '/static/icon/my/six.png',
					url: '/my_pages/journal/journal',
				},  
				// {
				// 	id: 7,
				// 	title: '退出登录',
				// 	iconUrl: '/static/icon/my/five.png',
				// 	url: ''
				// }
				]
			}
		},
		methods: {
			confirm() {
				this.$emit('changeInfo',true)
				this.show = false
			},
			cancel() {
				this.show = false
			},
			jumpPages(url,id) {
				console.log(id)
				if(id == 7){
					this.show = true
					return false;
				}
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list-box {
		z-index: 999;
		margin: 70upx 30upx 80upx;
		border-radius: 20upx;
		// background-color: #fff;
		padding: 0 20upx;
		margin-top: 0;
	}
	
	.list-item {
		height: 100upx;
		line-height: 100upx;
		// border-bottom: 1upx solid #ECECEC;
	}

	.list-item:last-child {
		border: none;
	}

	text {
		color: #4D4D4D;
		font-size: 28upx
	}

	.icon {
		width: 30upx;
		height: 30upx;
		margin-right: 20upx;
	}
</style>
